package org.longhua.cloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.longhua.cloud.domain.CommonResult;
import org.longhua.cloud.domain.SystemConfig;
import org.longhua.cloud.service.SystemConfigService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/sysConfig")
public class SystemConfigController {

    @Resource
    SystemConfigService systemConfigService;

    @GetMapping("/getsysconfig/{id}")
    public CommonResult<SystemConfig> getSysConfig(@PathVariable("id") Integer id){
        SystemConfig systemConfig = systemConfigService.getSysConfig(id);
        return CommonResult.ok(systemConfig);
    }
}
